namespace KYO.DAL {
    using System;
    using System.Text;
    using System.Collections;
    using System.Collections.Generic;
    
    public partial class Module : ObjectPersistence.ORNetBaseType {
        public Module() {
        }
        public Module(string Author, string CopyRight, string Description, string FileName, string ModulePath, string Name, string Version) {
            this.Author = Author;
            this.CopyRight = CopyRight;
            this.Description = Description;
            this.FileName = FileName;
            this.ModulePath = ModulePath;
            this.Name = Name;
            this.Version = Version;
        }
        public Module(int ModuleId, string Author, string CopyRight, string Description, string FileName, string ModulePath, string Name, string Version) {
            this.ModuleId = ModuleId;
            this.Author = Author;
            this.CopyRight = CopyRight;
            this.Description = Description;
            this.FileName = FileName;
            this.ModulePath = ModulePath;
            this.Name = Name;
            this.Version = Version;
        }

        public int ModuleId {
            get {
                return _ModuleId;
            }
            set {
                this._ModuleId = value;
                this.ChangesMade = true;
            }
        }
        public string Author {
            get {
                return _Author;
            }
            set {
                this._Author = value;
                this.ChangesMade = true;
            }
        }
        public string CopyRight {
            get {
                return _CopyRight;
            }
            set {
                this._CopyRight = value;
                this.ChangesMade = true;
            }
        }
        public string Description {
            get {
                return _Description;
            }
            set {
                this._Description = value;
                this.ChangesMade = true;
            }
        }
        public string FileName {
            get {
                return _FileName;
            }
            set {
                this._FileName = value;
                this.ChangesMade = true;
            }
        }
        public string ModulePath {
            get {
                return _ModulePath;
            }
            set {
                this._ModulePath = value;
                this.ChangesMade = true;
            }
        }
        public string Name {
            get {
                return _Name;
            }
            set {
                this._Name = value;
                this.ChangesMade = true;
            }
        }
        public string Version {
            get {
                return _Version;
            }
            set {
                this._Version = value;
                this.ChangesMade = true;
            }
        }


        public BusinessLayerHelper.PersistentList<KYO.DAL.ModuleIntall> ModuleIntallCollection {
            get {
                if ((_ModuleIntallCollection == null)) {
                    if (IsNew) {
                        _ModuleIntallCollection = new BusinessLayerHelper.PersistentList<KYO.DAL.ModuleIntall>();
                    }
                    else {
                        ObjectPersistence.ModuleAssembler _tempAssem = new ObjectPersistence.ModuleAssembler();
                        _ModuleIntallCollection = _tempAssem.GetModuleIntallCollection(ModuleId);
                    }
                }
                return _ModuleIntallCollection;
            }
            set {
                this._ModuleIntallCollection = value;
            }
        }


        private int _ModuleId;
        private string _Author;
        private string _CopyRight;
        private string _Description;
        private string _FileName;
        private string _ModulePath;
        private string _Name;
        private string _Version;
        private BusinessLayerHelper.PersistentList<KYO.DAL.ModuleIntall> _ModuleIntallCollection;


        public bool IsModuleIntallCollectionNull() {
            return (this._ModuleIntallCollection == null);
        }
        public string ROKeyString {
            get {
                return ("KYO.DAL.Module" + ModuleId.ToString());
            }
        }

    }
}
